#include<unistd.h>
#include"Log.hpp"
#include"ThreadPool.hpp"
#include"Task.hpp"

using namespace LogModule;
using namespace ThreadPoolModule;
int main()
{
    // LOG(LogLevel::DEBUG)<<"1";
    // LOG(LogLevel::DEBUG)<<"2";

    // ENABLE_FILE_LOG_STRATEGY();
    // LOG(LogLevel::DEBUG)<<"3";
    // LOG(LogLevel::DEBUG)<<"4";

    // ENABLE_CONSOLE_LOG_STRATEGY();
    // LOG(LogLevel::DEBUG)<<"5";
    // LOG(LogLevel::DEBUG)<<"6";

    ENABLE_CONSOLE_LOG_STRATEGY();



    int cnt=7;
    while(cnt--)
    {
        ThreadPool<task_t>::GetInstance()->Equeue(Download);
        sleep(1);
    }

    ThreadPool<task_t>::GetInstance()->Stop();
    ThreadPool<task_t>::GetInstance()->Join();


    return 0;
}